package com.market.user.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.market.user.dao.UserMapper;
import com.market.user.service.UserService;
import com.market.user.vo.UserDetailVo;
import com.market.user.vo.UserVo;

@Service
@Transactional
public class UserServiceImpl implements UserService{

	@Autowired
	private UserMapper userMapper;
	
	public UserVo checkUserLogin(UserVo userVo) {
		UserVo user = userMapper.login(userVo);
		return user;
	}

	public int userRegister(UserVo userVo, UserDetailVo userDeatialVo) {
		userMapper.insertUser(userVo);
		int result = userMapper.insertUserDetial(userDeatialVo);
		return result;
	}
	
}
